package demo6;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class Person {
//    @Resource(name="shirt")
//   private Clothes clothes;
    @Resource
    private Clothes shirt;
   @Override
    public String toString() {
        return "Person{" +
                "clothes=" + shirt +
                '}';
    }
}















